<template>
    <div class="commentContainer">
        <!-- 评论区 传递参数给子组件-->
        <comment-box :id="id"></comment-box>
    </div>
</template>

<script>
    // 导入评论子组件
    import comments from '../comments.vue'
    export default {
        data(){
            return{
                id:this.$route.params.id
            }
        },
        //注册子组价
        components: {
            'comment-box': comments
        }
    }
</script>

<style lang="scss" scoped>
    .commentContainer{
        padding: 10px;
    }
</style>
